Considering a frequency of access to groups of tracks and density of the groups to select groups of tracks to destage

ABSTRACT

Provided are a computer program product, system, and method for considering a frequency of access to groups of tracks and density of the groups to select groups of tracks to destage. One of a plurality of densities for one of a plurality of groups of tracks is incremented in response to determining at least one of that the group is not ready to destage and that one of the tracks in the group in the cache transitions to being ready to destage. A determination is made of a group frequency indicating a frequency at which tracks in the group are modified. At least one of the density and the group frequency is used for each of the groups to determine whether to destage the group. The tracks in the group in the cache are destaged to the storage in response to determining to destage the group.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to a computer program product, system, andmethod for considering a frequency of access to groups of tracks anddensity of the groups to select groups of tracks to destage.

2. Description of the Related Art

A cache management system buffers tracks in a storage device recentlyaccessed as a result of read and write operations in a faster accessstorage device, such as memory, than the storage device storing therequested tracks. Subsequent read requests to tracks in the fasteraccess cache memory are returned at a faster rate than returning therequested tracks from the slower access storage, thus reducing readlatency. The cache management system may also return complete to a writerequest when the modified track directed to the storage device iswritten to the cache memory and before the modified track is written outto the storage device, such as a hard disk drive. The write latency tothe storage device is typically significantly longer than the latency towrite to a cache memory. Thus, using cache also reduces write latency.

Current destaging techniques, known as Intelligent Write Caching (IWC)or Wise Order Writing (WOW), select tracks to destage based on both atemporality or time the track has been in cache, with an algorithm knownas CLOCK, and based on the spatial location of the track, with analgorithm known as CSCAN. CLOCK is a Least Recently Used (LRU) basedalgorithm which demotes tracks that have been in the cache the longest,i.e., least recently used. To obtain CLOCK properties, the IWC maintainsa temporal bit per track. The temporal bit gets set when the host writesa track. The temporal bit gets reset when a destage scan comes across atrack with temporal bit set. If the destage scan finds a stride in aRedundant Array of Independent Disks (RAID) array with no tracks havingthe temporal bit set, than the destage scan can select that stride fordestage. The C SCAN operation destages tracks based on spatial location.To obtain CSCAN properties, the IWC maintains a sorted list of modifiedtracks using a balanced tree (B-tree). The destage scan traverses thebalanced tree to look for tracks at the nodes of the balanced tree todestage, where the balanced tree organizes tracks based on an order oftrack location from lowest to highest address.

There is a need in the art for improved techniques for destaging tracksin cache to storage.

SUMMARY

Provided are a computer program product, system, and method forconsidering a frequency of access to groups of tracks and density of thegroups to select groups of tracks to destage. One of a plurality ofdensities for one of a plurality of groups of tracks is incremented inresponse to determining at least one of that the group is not ready todestage and that one of the tracks in the group in the cache transitionsto being ready to destage. A determination is made, for each of thegroups, of a group frequency indicating a frequency at which tracks inthe group are modified. At least one of the density and the groupfrequency is used for each of the groups to determine whether to destagethe group. The tracks in the group in the cache are destaged to thestorage in response to determining to destage the group.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an embodiment of a computing environment.

FIG. 2 illustrates an embodiment of a group information of a group oftracks.

FIG. 3 illustrates an embodiment of track information for tracks in thecache.

FIG. 4 illustrates an embodiment of group set information on groups in agroup set.

FIG. 5 illustrates an embodiment of a tree node of a node in a balancedtree.

FIG. 6 illustrates an embodiment of Redundant Array of Independent Disk(RAID) configuration information.

FIG. 7 illustrates an embodiment of a stride group providing informationon a group of strides.

FIG. 8 illustrates an embodiment of rank information having informationfor stride groups of strides in a RAID rank.

FIG. 9 illustrates an embodiment of operations to process a write to atrack.

FIG. 10 illustrates an embodiment of operations to select a group oftracks in cache to destage to storage using a group density of tracks inthe cache.

FIG. 11 illustrates an embodiment of operations to destage a group oftracks based on a group density and urgency to destage tracks from thecache.

FIG. 12 illustrates an embodiment of operations to destage a group oftracks from cache based on a frequency that the tracks in the group aremodified.

FIGS. 13a and 13b illustrate an embodiment of operations to destage agroup of tracks from cache based on a frequency that the tracks in thegroup are modified and a density of the tracks in the cache for thegroup.

FIG. 14 illustrates a computing environment in which the components ofFIG. 1 may be implemented.

DETAILED DESCRIPTION

The above described techniques for destaging tracks from cache based onthe least recently used track in cache and the spatiality with respectto a last destaged track do not take into account a density of a groupof modified tracks in the cache to destage, where the density mayreflect a number of consecutive tracks ready to destage as well as aduration in which the group of tracks has remained in cache.

The issue of the consecutive or sequential nature of the data beingwritten or destaged is of particular concern for Solid State StorageDrives (SSDs), because SSDs experience write amplification. With writeamplification, a single write to the SSD results in multiple writes toperform garbage collection to free up a block of pages of the SSD. Ifnot all the cells in the pages of a block of SSD data are updated, thenthe non-modified cells need to be consolidated and rewritten to a newpage to free up the pages having a combination of non-modified (valid)data and modified (stale) data updated at a new location. After garbagecollection, the blocks from which valid data was written are then freeto be available for further write data or garbage collection. Further,because the life of an SSD is based on the number of writes, limitingthe effects of write amplification can increase the longevity of theNAND cells in the SSD. One way to reduce write amplification is toprefer writing data to sequential or consecutive addresses in the SSD orto have data modified at a similar frequency written to the same blocksof pages.

Described embodiments provide techniques to increase the likelihood ofdestaging tracks of data at consecutive addresses in a group of tracksto storage, such as SSDs, to realize benefits in writing data atconsecutive addresses, such as experienced by SSDs. Other types ofstorage devices may also benefit from writing groups of tracks that tendto have more tracks ready to destage.

Described embodiments provide techniques for selecting groups of tracksto destage that have a greater density of tracks to destage over othergroups of tracks. Groups of tracks in the cache are scanned to determinewhether they are ready to destage. The groups may be comprised of trackshaving data at consecutive addresses in storage. A determination is madeas to whether the tracks in one of the groups of tracks indicate thatthe tracks in the group are ready to destage. A density for the group isincreased in response to determining that at least one of the tracks inthe group is not ready to destage. Density for a group may also beincreased when a track transitions to a ready to destage state. A groupof tracks not having all tracks ready to destage is destaged in responseto determining that the density of the group exceeds a densitythreshold.

Further embodiments provide a technique for selecting groups of tracksto destage based on the frequency with which tracks in the cache havebeen modified. In one low frequency pass of scanning the groups oftracks, tracks may be selected for destage that have a modificationfrequency below a threshold and during a subsequent high frequency pass,tracks may be selected having a modification frequency higher than athreshold. This ensures that tracks are destaged that have a similarmodification frequency profile. In this way, for SSD implementations,writing tracks at relatively the same time, or with similar modificationfrequency, minimizes the number of tracks that have to be moved when anew page is written as part of garbage collection because consecutivetracks in the same pages of the SSD storage blocks are updated at thesame time and the updated cells on the same page do not have to be movedto a new garbage collection page.

In yet further embodiments, both density and frequency may be used toselect tracks to destage to further increase the likelihood thatconsecutive tracks are updated at the same time. In SSD embodiments,updating consecutive tracks simultaneously in the same pages of a NANDblock minimizes the number of cells and pages having non-modified datathat need to be moved to a new page as part of garbage collection, thusminimizing write amplification.

FIG. 1 illustrates an embodiment of a computing environment. A pluralityof hosts 102 a, 1022 b . . . 102 n may submit Input/Output (I/O)requests to a storage controller 104 over a network 106 to access datain storage devices 108 in a storage 110. The storage controller 104includes a plurality of processors 112 and a memory 114, including acache 116 to cache data for the storage 110. Each of the processors 112may comprise a separate central processing unit (CPU), one or a group ofmultiple cores on a single CPU, or a group of processing resources onone or more CPUs. The cache 116 buffers data transferred between thehosts 102 a, 102 b . . . 102 n and the storage 110.

The memory 114 further includes a storage manager 118 for managing thetransfer of tracks transferred between the hosts 102 a, 102 b . . . 102n and the storage 110 and a cache manager 120 that manages datatransferred between the hosts 102 a, 102 b . . . 102 n and the storagedevices 108 in the cache 116. A track may comprise any unit of dataconfigured in the storage devices 108, such as one or more logicaladdresses.

The cache manager 120 maintains cache management information 122 in thememory 114 to manage caching of data. The cache management information122 may include group information 200 having information on tracks inone more groups of tracks stored in the storage 110; track information300 having information on tracks in the cache 116; group set information400 having information on the groups 200 organized as a set of groups; abalanced tree 500 of nodes representing an ordering of groups 200; acache index 124 identifying tracks in the cache 116; and a RedundantArray of Independent Disk (RAID) configuration information 600 on theconfiguration of RAID arrays in the storage 110 if used.

The storage manager 118 and cache manager 120 are shown in FIG. 1 asprogram code loaded into the memory 114 and executed by one or more ofthe processors 112. Alternatively, some or all of the functions may beimplemented in hardware devices in the storage controller 104, such asin Application Specific Integrated Circuits (ASICs).

The storage 110 may comprise one or more storage devices 108 known inthe art, such as a solid state storage device (SSD) comprised of solidstate electronics, EEPROM (Electrically Erasable Programmable Read-OnlyMemory), flash memory, flash disk, Random Access Memory (RAM) drive,storage-class memory (SCM), Phase Change Memory (PCM), resistive randomaccess memory (RRAM), spin transfer torque memory (STM-RAM), conductivebridging RAM (CBRAM), magnetic hard disk drive, optical disk, tape, etc.The storage devices may further be configured into an array of devices,such as Just a Bunch of Disks (JBOD), Direct Access Storage Device(DASD), Redundant Array of Independent Disks (RAID) array,virtualization device, etc. Further, the storage devices may compriseheterogeneous storage devices from different vendors or from the samevendor.

The memory 114 may comprise a suitable volatile or non-volatile memorydevices, including those described above.

The network 106 may comprise a Storage Area Network (SAN), a Local AreaNetwork (LAN), a Wide Area Network (WAN), the Internet, and Intranet,etc. Alternatively, the hosts 102 a, 102 b . . . 102 n may connect tothe storage controller 104 over a bus interface, such as a PeripheralComponent Interconnect (PCI) bus interface and other interfaces known inthe art.

In one embodiment, the storage devices 108 may comprise solid statedrives (SSDs), and the storage manager 118 manages the data store in thestorage devices 108 as a RAID array, where tracks in strides of the RAIDarray map to logical addresses in the storage devices 108. Inalternative embodiment, the storage devices 108 may comprise otherdevices than SSDs or a combination of SSDs and other types of storagedevices.

FIG. 2 illustrates an embodiment of an instance of a group 200 _(i) inthe group information 200, including a group identifier (ID) 202; atrack list 204 comprising a linked list of tracks in the groups 204 thatare in the cache 116; a density 206 of the group 200 _(i); and a groupfrequency 208 indicating a number of times tracks in the group have beenmodified. The density 206 indicates a number of tracks in the group 200_(i) that are eligible to destage and an age of the tracks in the cache116 in the group 200, or number of times the tracks have been passedover for destaging. Thus, the density 206 indicates an extent to whichthe tracks 204 in the group are ready to be destaged from the cache 116to the storage 110.

FIG. 3 illustrates an instance of track information 300 _(i) for one ofthe tracks in the cache 116, including a track identifier (ID) 302; oneor more logical addresses 304 in the track 302 in the storage devices108; a temporal indicator 306 indicating an extent to which the track302 is ready to destage; and a frequency 308 indicating a number oftimes the track has been modified in the cache 116. In one embodiment,the temporal indicator 306 is incremented, such as by one, when thetrack 302 is modified or accessed in the cache 116, such as read orwrite access, and decremented, such as by one, when the track isretained in cache 116 after being scanned for destage.

FIG. 4 illustrates an embodiment an instance of group set information400 _(i) for one of the sets of groups, where groups may be organizedinto different group sets. An instance of group set information 400 _(i)may include a group set identifier 402; indication of the groups 404associated in the group set 402; a mean density 406 comprising a mean ofall the densities 206 of the groups 404; a density standard deviation408; a total frequency 410 indicating a number of times all the tracksin the cache 116 in the groups 404 have been modified; a total number ofmodified tracks 412 in the cache 116 in the groups 404; a mean frequency414 comprising the total frequency 410 divided by the total numbermodified tracks 412; and a scan pass number 416 indicating a type offrequency criteria to use to determine whether to destage the tracks inthe cache 116 associated in the group set 400 _(i), such as a high orlow frequency criteria.

FIG. 5 illustrates an embodiment of a tree node 500 _(i) in the balancedtree 500, including a tree node identifier (ID) 502 identifying the nodein the tree 500; a group ID 504 of a group 200 _(i) associated with thenode 502; a parent node 506 to the node 502 in the balanced tree 500;and one or more child nodes 508 of the node 504. In one embodiment, thebalanced tree 500 may comprise a B tree.

In certain embodiments, the tracks in the storage 110 may be configuredas a RAID array. FIG. 6 illustrates an embodiment of an instance of RAIDconfiguration information 600 i in the RAID information 600 for a RAIDrank 602 configured in the storage devices 108 having a plurality ofstrides 604, and parity information 606 for the strides 604. Each stride604 may have its own parity information for error correction of the datain the stride. The RAID information 600 is available when the groups oftracks comprise strides of tracks striped across the storage devices108.

The groups 200 of tracks may comprise any grouping of tracks that are inthe storage 110, such as groups of consecutive tracks, etc. Further, incertain embodiments the groups 200 may group further sub-groups oftracks. For instance, in RAID implementations, each group 200 _(i) maycomprise a plurality of strides, such as consecutive strides, in a RAIDconfiguration. A stride is a unit in a RAID rank for which parityinformation is calculated according to a RAID level algorithm, and thetracks in the stride are striped across the data storage devices 108 inthe array configuration. Tracks in the stripe on one of the storagedevices 108 comprise a strip. The tracks in a strip may compriseconsecutive addresses, and the strips in one stride striped to differentstorage devices 108 may be at the same logical address as strips inother storage devices 108 in the same stride.

FIG. 7 illustrates an embodiment of a group 200 _(i) comprising a stridegroup 700 i including a stride group identifier (ID) 702; strides 704identifying strides in a rank of a RAID array associated with the stridegroup 702; a track list 706 comprising a linked list of tracks in thestride groups 704 that are in the cache 116; a density 708 of thestrides 704; and a group frequency 710 indicating a number of timestracks 706 in the group 702 have been modified. The density 708 andfrequency 710 may be calculated and used in the same manner as the groupdensity 206 and group frequency 708 in FIG. 2, but are insteadcalculated for the tracks 706 in all the strides 704 in the cache 116associated with the stride group 700 _(i).

FIG. 8 illustrates an embodiment of the group set information 400 _(i)of FIG. 4 as comprising rank information 800 i for a RAID rank having aplurality of strides. In such RAID embodiments, the rank information 800i may include a rank identifier 802; indication of the strides groups804 associated with strides in the rank 802; a mean density 806comprising a mean of all the stride densities 708 of the stride groups700 _(i); a standard deviation 808 of the mean density 806; a totalfrequency 810 indicating a number of times all the tracks in the cache116 in all the stride groups 804 of strides in the rank 802 have beenmodified; a total number of modified tracks 812 in the cache 116 in thestride groups 700 _(i) including strides in the rank 802; a meanfrequency 814 comprising the total frequency 810 divided by the totalnumber modified tracks 812; and a scan pass number 816 indicating a typeof frequency criteria to use to determine whether to destage the tracksin the cache 116 associated in the group set 400 _(i), such as a low orhigh frequency criteria.

FIG. 9 illustrates an embodiment of operations performed by the cachemanager 120 to process requests to tracks. Upon receiving (at block 900)a write to a track, if (at block 902) the track is not in the cache 116,then the requested track is staged (at block 904) from the storage 110to the cache 116. The identity of the track is added (at block 906) tothe track list 206 in the group 200 _(i) including the track 204. Afterthe track is in cache 116 (from the yes branch of block 902 or block906), the temporal indicator 306 for the track is incremented (at block908) to indicate the track is not ready to destage. Further, the trackfrequency 308, group frequency 208 of the group having the modifiedtrack, and the total frequency 410 across groups in the group set areincremented to indicate the number of times the track has been modified.

FIG. 10 illustrates an embodiment of operations performed by the cachemanager 120 to destage tracks organized into groups taking into accountjust the group density 206, not the frequency 208. The groups 200 _(i)are processed in the order of the nodes 500 _(i) in the tree 500 towhich the groups 200 are assigned. Groups 200 _(i) may be assigned tonodes 500 _(i) to order the tracks 204 in the groups according to aconsecutive track order. In RAID implementations, the nodes 500 _(i) mayorder the stride groups 700 _(i) according to an ordering of the strides704 in the stride groups 702, so that the nodes provide a consecutiveordering of strides in the RAID rank. Upon initiating (at block 1000)the operation to destage tracks, a loop of operations is performed fromblocks 1002 through 1018 for each of the groups 200 of tracks accordingto the order of the nodes assigned the groups.

At block 1004, the cache manager 120 decrements the temporal indicator306 for the tracks in the group i that are not ready to destage, such asthe tracks having a temporal indicator 306 greater than zero. Thetemporal indicator 306 may be decremented by one. For any tracks havingtheir temporal indicator 306 decremented to zero, the density 206 forthe group i is incremented (at block 1006) by a fixed amount, such asthe size of the track now ready to destage as a result of thedecrementing of the temporal indicators 306 in block 1004. If (at block1008) all the tracks in group i are ready to destage, which may beindicated when the temporal indicator 306 for all the tracks in thetrack list 204 for group i are zero, then the cache manager 120determines (at block 1010) whether the density 206 for group i exceeds adensity threshold, such as the mean density of the groups 406 for thegroup set including group i.

If (at block 1010) the density threshold is satisfied, then the cachemanager 112 destages (at block 1012) the tracks 204 in group i in thecache 116 to the storage 110. The density 206 for group i whose tracksin cache 116 are destaged is set (at block 1014) to zero.

If (at block 1010) the density 206 does not exceed the densitythreshold, e.g., mean density 406 or if (at block 1008) all the tracksin group i are not ready to destage, i.e., temporal indicator 406 is notzero, then the density 206 for group i is incremented (at block 1016) bya fixed amount, such as a percentage of the size of all the tracks inthe group. Increasing the density 206 increases the likelihood that thetracks in group i will be destaged the next time the balanced tree 500is scanned. From blocks 1014 or 1016, control proceeds to block 1018 toprocess a next node 500 _(i) in the balanced tree 500 to process a nextgroup 200 _(i) to determine whether to destage.

In embodiments where the groups 200 _(i) comprise stride groups 700_(i), the logic of FIG. 10 determines whether to destage the tracks 706in the strides 704 in the stride group 700 _(i) based on the temporalindicators 306 in the tracks 706 and the stride group density 708. Thedensity threshold may comprise a mean density 806 of the stride groupsin the rank having the strides 704 in stride group 700 _(i) beingprocessed

With the described operations of FIG. 10, groups having more tracksready to destage and having been in cache longer, i.e., having gonethrough the scanning operations of FIG. 10, will have a higher densitywhich makes them more eligible for destaging, i.e., having a densityexceeding a density threshold. The density 206 for the group may beincremented when a track in the group reaches a point where it is readyto destage, such as the temporal indicator 306 transitioning to beingset to zero or if after all tracks in the group are scanned, the groupis still not destaged. Tracks in the group may have their temporalindicator 306 incremented when they are read or write accessed in thecache 116 and decremented if they are scanned during the destage processwithout being destaged. Thus, the density for a group, such as a stride,indicates both an extent to which the tracks are ready to destage andhow long the group of tracks has remained in the cache 116. A higherdensity indicates a higher imperative to destage the tracks. Tracks in agroup having higher density may more likely be tracks mapping toconsecutive addresses in the storage devices 108. In embodiments wherethe storage devices 108 comprise SSDs, disk performance is optimized bydestaging more tracks at consecutive logical addresses, which is morelikely to occur with a high density group, because write amplificationat the SSDs is reduced by writing tracks having greater sequentially.

In a further embodiments, the tracks in a group may be destaged if thetracks in the cache 116 for a group are all sequential or at consecutiveaddresses in the storage devices 108 regardless of density becausedestaging such a group having all consecutive tracks in cache wouldresult in the benefits of writing data to consecutive addresses, such asbenefits SSD devices by reducing write amplification.

FIG. 11 illustrates an embodiment of operations performed by the cachemanager 120 to perform the operations at block 1010 to determine whetherbased on the density a group of tracks should be destaged. Uponinitiating (at block 1100) an operation to determine whether to performa density based destaging of a group of tracks, the cache manager 120determines (at block 1102) an urgency of destaging data based on amountof available space (e.g., high urgency, medium urgency, low urgency). Inone embodiment, the urgency may be based on an amount of available spacein the cache 116. In RAID implementations, the urgency may vary based onnumber of ranks having strides in the cache 116 as well as availability,such that tracks from more ranks in the cache 116 may create a greaterurgency than if there are fewer ranks having tracks in the cache 116.

If (at block 1103) the urgency is high, then the density threshold isset (at block 1104) to a mean 406, 806 of the densities for all groupshaving tracks in the cache 116 minus a standard deviation 408, 808 fromthe mean. If (at block 1103) the urgency is medium, then the densitythreshold is set (at block 1106) to a mean of the densities 406, 806 ofthe groups having tracks in the cache 116. If (at block 1103) theurgency is low, then the density threshold is set (at block 1108) to amean of the densities for all groups having tracks in the cache 116 plusa standard deviation from the mean. In this way, the higher the urgency,the lower the threshold requirement is set.

If (at block 1110) the density for the group is greater than the setdensity threshold, i.e., set at block 1104, 1106, 1108, then the tracksin the cache 116 for the group are destaged (at block 1112) to thestorage 110 and the group density 206 is set (at block 1114) to zero. If(at block 1110) the group density 206 does not exceed the set densitythreshold, then the group is not destaged (at block 1116).

With the described embodiments of FIG. 11, depending on the urgency orneed to destage tracks from cache 116, a density threshold is set, tomake the threshold relatively higher if the urgency is low andrelatively lower if the urgency is high, to perform a density baseddestage operation. The density based destage ensures that groups oftracks that have been in cache 116 for relatively longer and/or thathave relatively more tracks ready for destage have a greater likelihoodof exceeding the density threshold and be destaged even when such groupsdo not have all their tracks ready for destage.

FIG. 12 illustrates an additional embodiment of operations performed bythe cache manager 120 to determine groups 200 of tracks to destage basedon a frequency with which tracks in a group 200 _(i) are modified. Thegroups 200 _(i) are processed in the order of the nodes 500 _(i) in thetree 500 to which the groups 200 are assigned. Groups 200 _(i) may beassigned to nodes 500 _(i) to order the tracks 204 in the groupsaccording to a consecutive order. In RAID implementations, the nodes 500_(i) may order the stride groups 700 _(i) according to an ordering ofthe strides 704 in the stride groups 702, so that the nodes provide aconsecutive ordering of strides in the RAID rank. Upon initiating (atblock 1200) the operation to destage tracks based on the frequency atwhich tracks are modified, the cache manager 120 toggles (at block 1202)the scan pass number 416, 816 indicating whether to perform a highfrequency or low frequency scan, so that the cache manager 120alternates between performing scanning based on a high and low frequencycriteria.

The cache manager 120 performs a loop of operations at blocks 1204through 1222 for each of the groups of tracks according to the order ofthe nodes 500 assigned the groups 200. The cache manager 120 decrements(at block 1206) the temporal indicator 306 for the tracks in the group ithat are not ready to destage, such as the tracks having a temporalindicator 306 greater than zero. The temporal indicator 306 may bedecremented by one. If (at block 1208) all the tracks in group i are notready to destage, which may be indicated when the temporal indicator 306for all the tracks in the track list 204 for group i are not zero, thenthe cache manager 120 proceeds to block 1222 to consider the next groupi in the balanced tree 500. If (at block 1208) all the tracks 204 in thegroup i are ready to destage, then the cache manager 120 calculates (atblock 1210) the mean frequency 414 as total frequency 410 for all tracksin all the groups in the group set 400 i having group i divided by thetotal number of modified tracks 412 in the groups 404 in the group set402 including group i that are in the cache 116.

The cache manager 120 determines (at block 1212) whether the scan passnumber 416 indicates a first or second type of scan, e.g., low or highfrequency scan, type of frequency criteria, e.g., low frequency, thenthe cache manager 120 determines (at block 1214) whether the group ifrequency 208 satisfies the low frequency requirement, such as is lessthan the mean frequency 414 for all groups 200 in the group set 400_(i). If (at block 1214) the first (low) frequency requirement is notsatisfied, then control proceeds to block 1222 to consider the nextgroup i in the balanced tree. If (at block 1214) the low frequencyrequirement is satisfied, then the cache manager 120 decrements (atblock 1216) the total frequency 410 by the frequencies 208 of the tracksin group i to destage and set the destaged tracks' frequency 308 tozero. The tracks in the cache 116 for group i are then destaged (atblock 1218) and control proceeds to block 1222 to consider the nextgroup i.

If (at block 1214) the scan pass number 414 indicates a second scanning,such as a high frequency criteria, then the cache manager 120 determines(at block 1220) whether the group i frequency 208 satisfies a second(high) frequency requirement, e.g., exceeds the mean frequency 414. Ifso, then control proceeds to block 1216 to destage the tracks in groupi, otherwise, control proceeds to block 1222 to consider the next node500 _(i) in the balanced tree 500 until all nodes are considered.

In embodiments where the groups 200 _(i) comprise stride groups 700_(i), the logic of FIG. 12 determines whether to destage the tracks 706in the strides 704 in the stride group 700 _(i) based on the temporalindicators 306 in the tracks 706 and the frequency 710 of the groupindicating the number of times tracks in the strides 704 in the stridegroup 700 _(i) have been modified. The mean frequency may comprise amean frequency 814 of the stride groups 804 in the rank 802 having thestrides 704 in stride group 700 _(i) being processed during the low orhigh frequency scanning.

With the embodiment of FIG. 12, tracks with similar write ormodification frequency are written together. For implementations wherethe storage devices 108 comprise SSDs, the embodiment of FIG. 12increases the likelihood that consecutive tracks having a similarfrequency are written to the same pages in blocks of the SSD NAND cells.This makes it more likely the tracks will all be rewritten at the sametime, leaving fewer unmodified cells in the pages that need to besubject to garbage collection during subsequent writes. Reducing thenumber of pages that need to be subject to garbage collection reduceswrite amplification and prolongs the life of SSD devices.

FIGS. 13a and 13b illustrate an additional embodiment of operationsperformed by the cache manager 120 to determine groups 200 of tracks todestage based on both a frequency 208 with which tracks in a group 200_(i) are modified and a density 206 of the group. The groups 200 _(i)are processed in the order of the nodes 500 _(i) in the tree 500 towhich the groups 200 are assigned. Groups 200 _(i) may be assigned tonodes 500 _(i) to order the tracks 204 in the groups according to aconsecutive order. In RAID implementations, the nodes 500 _(i) may orderthe stride groups 700 _(i) according to an ordering of the strides 704in the stride groups 702, so that the nodes provide a consecutiveordering of strides in the RAID rank.

Upon initiating (at block 1300) the operation to destage tracks based onboth frequency and density, the cache manager 120 toggles (at block1302) the scan pass number 416 indicating whether to perform a highfrequency or low frequency scan, so that the cache manager 120alternates between performing scanning based on a high and low frequencycriteria. The cache manager 120 performs a loop of operations at blocks1304 through 1326 for each of the groups of tracks according to theorder of the nodes 500 assigned the groups 200. The cache manager 120decrements (at block 1306) the temporal indicator 306 for the tracks ingroup i that are not ready to destage, such as the tracks having atemporal indicator 306 greater than zero. The temporal indicator 306 maybe decremented by one. For any tracks having their temporal indicator306 decremented to zero, the density 206 for group i is incremented (atblock 1308) by a fixed amount, such as the size of the track now readyto destage as a result of the decrementing of the temporal indicators306 in block 704.

If (at block 1310) all the tracks in group i are not ready to destage,which may be indicated when the temporal indicator 306 for all thetracks in the track list 204 for group i are not zero, then the cachemanager 120 increments (at block 1312) the density 206 for group i by afixed amount, such as a percentage of the size of all the tracks in thegroup. Increasing the density 206 increases the likelihood the tracks ingroup i will be destaged the next time the balanced tree 500 is scanned.From blocks 1312, control proceeds to block 1326 to process a next node500 _(i) in the balanced tree 500 to process a next group 200 _(i) todetermine whether to destage.

If (at block 1310) all the tracks in group i are ready to destage, thenthe cache manager 120 calculates (at block 1314) the mean frequency 414as total frequency 410 for all tracks in all the groups in the group set400 i having group i divided by the total number of modified tracks 412in the groups 404 in the cache 116. If (at block 1315) the scan passnumber 416 indicates a first type of frequency criteria, e.g., lowfrequency, then the cache manager 120 determines (at block 1316) whetherthe group i frequency 208 satisfies the low frequency requirement, suchas is less than the mean frequency 414 in the group set 400 _(i). If (atblock 1316) the low frequency requirement is satisfied, then the cachemanager 120 decrements (at block 1318) the total frequency 410 by thefrequencies 208 of the tracks in group i to destage and sets thedestaged tracks' frequency 308 to zero. The density 206 for group ihaving the destaged tracks is set (at block 1320) to zero. The tracks inthe cache 116 for group i are destaged (at block 1322) and controlproceeds to block 1326 to consider the next group i.

If (at block 1316) the first (low) frequency requirement is notsatisfied, then the density 206 for group i is incremented (at block1324) by a fixed amount, such as a percentage of the size of all thetracks in the group. Increasing the density 206 increases the likelihoodthe tracks in group i will be destaged the next time the balanced tree500 is scanned.

If (at block 1315) the scan pass number 416 indicates a second scanning,such as a high frequency criteria, control proceeds to block 1328 inFIG. 13b where the cache manager 120 determines whether the group ifrequency 208 exceeds the mean frequency 414. If so, then the cachemanager 120 determines (at block 1330) whether the density 206 for groupi exceeds a density threshold, such as the mean density of the groups406 for the group set including group i. If both the high frequency anddensity requirements are satisfied, then control proceeds to block 1318in FIG. 13a to destage the tracks 204 in group i. Otherwise, if eitherthe high frequency or density requirements are not satisfied, thencontrol proceeds to block 1324 in FIG. 13a to increment the density 206and consider the next group i in the balanced tree 500.

In embodiments where the groups 200 _(i) comprise stride groups 700_(i), the logic of FIGS. 13a and 13b determines whether to destage thetracks 706 in the strides 704 in the stride group 700 _(i) based on thetemporal indicators 306 in the tracks 706, the frequency 710 of thegroup indicating the number of times tracks in the strides 704 in thestride group 700 _(i) that have been modified, and the density 708 ofthe strides indicating a denseness of the consecutive tracks in thestrides 704 of a stride group 700 _(i) ready for destage. The meanfrequency may comprise a mean frequency 814 of the stride groups 804 inthe rank 802 having the strides 704 in stride group 700 _(i) beingprocessed during the low or high frequency scanning and the densitythreshold may comprise the mean density of the stride groups 806 in therank information 802. Further, the determination of whether the densitythreshold is exceeded may be performed according to the operations ofFIG. 11 considering both mean density of the stride groups 806 and thestandard deviation 808 from the mean density 806.

With the embodiment of FIGS. 13a and 13b , tracks with similar write ormodification frequency are written together. For implementations wherethe storage devices 108 comprise SSDs, the embodiment of FIGS. 13a and13b increases the likelihood that consecutive tracks having a similarfrequency are written to the same pages in blocks of the SSD NAND cells.This makes it more likely the tracks will all be rewritten at the sametime, leaving fewer unmodified cells in the pages that need to besubject to garbage collection. Further, destaging tracks (or strides oftracks) having a greater density, or a greater number of consecutivemodified tracks in the cache 114 further makes it more likely trackswill be written as groups and will fill the pages to reduce thelikelihood that after destaging there is valid unmodified data in thecells that need to be subject to garbage collection. Reducing the numberof pages that need to be subject to garbage collection reduces the writeamplification and prolongs the life of SSD devices.

Although in certain embodiments, the storage devices 108 are describedas being SSDs, the described embodiments and operations may apply toother type of storage devices. The described embodiments providespecific uses of density and frequency as criteria to determine when todestage tracks in the cache. In alternative embodiments, differentcombinations of density and/or frequency criteria may be used to selecttracks to destage to increase the likelihood that consecutive trackswill be destaged and that consecutive tracks having a similarmodification frequency be destaged in groups.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Java, Smalltalk, C++ or the like,and conventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The computational components of FIG. 1, including the hosts 102 a, 102 b. . . 102 n and storage controller 104, may be implemented in one ormore computer systems, such as the computer system 1402 shown in FIG.14. Computer system/server 1402 may be described in the general contextof computer system executable instructions, such as program modules,being executed by a computer system. Generally, program modules mayinclude routines, programs, objects, components, logic, data structures,and so on that perform particular tasks or implement particular abstractdata types. Computer system/server 1402 may be practiced in distributedcloud computing environments where tasks are performed by remoteprocessing devices that are linked through a communications network. Ina distributed cloud computing environment, program modules may belocated in both local and remote computer system storage media includingmemory storage devices.

As shown in FIG. 14, the computer system/server 1402 is shown in theform of a general-purpose computing device. The components of computersystem/server 1402 may include, but are not limited to, one or moreprocessors or processing units 1404, a system memory 1406, and a bus1408 that couples various system components including system memory 1406to processor 1404. Bus 1408 represents one or more of any of severaltypes of bus structures, including a memory bus or memory controller, aperipheral bus, an accelerated graphics port, and a processor or localbus using any of a variety of bus architectures. By way of example, andnot limitation, such architectures include Industry StandardArchitecture (ISA) bus, Micro Channel Architecture (MCA) bus, EnhancedISA (EISA) bus, Video Electronics Standards Association (VESA) localbus, and Peripheral Component Interconnects (PCI) bus.

Computer system/server 1402 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 1402, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 1406 can include computer system readable media in theform of volatile memory, such as random access memory (RAM) 1410 and/orcache memory 1412. Computer system/server 1402 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 1413 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 1408 by one or more datamedia interfaces. As will be further depicted and described below,memory 1406 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 1414, having a set (at least one) of program modules1416, may be stored in memory 1406 by way of example, and notlimitation, as well as an operating system, one or more applicationprograms, other program modules, and program data. Each of the operatingsystem, one or more application programs, other program modules, andprogram data or some combination thereof, may include an implementationof a networking environment. The components of the computer 1402 may beimplemented as program modules 1416 which generally carry out thefunctions and/or methodologies of embodiments of the invention asdescribed herein. The systems of FIG. 1 may be implemented in one ormore computer systems 1402, where if they are implemented in multiplecomputer systems 1402, then the computer systems may communicate over anetwork.

Computer system/server 1402 may also communicate with one or moreexternal devices 1418 such as a keyboard, a pointing device, a display1420, etc.; one or more devices that enable a user to interact withcomputer system/server 1402; and/or any devices (e.g., network card,modem, etc.) that enable computer system/server 1402 to communicate withone or more other computing devices. Such communication can occur viaInput/Output (I/O) interfaces 1422. Still yet, computer system/server1402 can communicate with one or more networks such as a local areanetwork (LAN), a general wide area network (WAN), and/or a publicnetwork (e.g., the Internet) via network adapter 1424. As depicted,network adapter 1424 communicates with the other components of computersystem/server 1402 via bus 1408. It should be understood that althoughnot shown, other hardware and/or software components could be used inconjunction with computer system/server 1402. Examples, include, but arenot limited to: microcode, device drivers, redundant processing units,external disk drive arrays, RAID systems, tape drives, and data archivalstorage systems, etc.

The terms “an embodiment”, “embodiment”, “embodiments”, “theembodiment”, “the embodiments”, “one or more embodiments”, “someembodiments”, and “one embodiment” mean “one or more (but not all)embodiments of the present invention(s)” unless expressly specifiedotherwise.

The terms “including”, “comprising”, “having” and variations thereofmean “including but not limited to”, unless expressly specifiedotherwise.

The enumerated listing of items does not imply that any or all of theitems are mutually exclusive, unless expressly specified otherwise.

The terms “a”, “an” and “the” mean “one or more”, unless expresslyspecified otherwise.

Devices that are in communication with each other need not be incontinuous communication with each other, unless expressly specifiedotherwise. In addition, devices that are in communication with eachother may communicate directly or indirectly through one or moreintermediaries.

A description of an embodiment with several components in communicationwith each other does not imply that all such components are required. Onthe contrary a variety of optional components are described toillustrate the wide variety of possible embodiments of the presentinvention.

When a single device or article is described herein, it will be readilyapparent that more than one device/article (whether or not theycooperate) may be used in place of a single device/article. Similarly,where more than one device or article is described herein (whether ornot they cooperate), it will be readily apparent that a singledevice/article may be used in place of the more than one device orarticle or a different number of devices/articles may be used instead ofthe shown number of devices or programs. The functionality and/or thefeatures of a device may be alternatively embodied by one or more otherdevices which are not explicitly described as having suchfunctionality/features. Thus, other embodiments of the present inventionneed not include the device itself.

The foregoing description of various embodiments of the invention hasbeen presented for the purposes of illustration and description. It isnot intended to be exhaustive or to limit the invention to the preciseform disclosed. Many modifications and variations are possible in lightof the above teaching. It is intended that the scope of the invention belimited not by this detailed description, but rather by the claimsappended hereto. The above specification, examples and data provide acomplete description of the manufacture and use of the composition ofthe invention. Since many embodiments of the invention can be madewithout departing from the spirit and scope of the invention, theinvention resides in the claims herein after appended.

1-22. (canceled)
 23. A computer program product for selecting tracks todestage from a cache to a storage, the computer program productcomprising a computer readable storage medium having computer readableprogram code embodied therein that when executed by a processor performsoperations, the operations comprising: determining a group frequency fora group of tracks indicating a number of times tracks in the group oftracks have been modified; determining whether the group frequencysatisfies a total frequency requirement for a total frequency, wherein atotal frequency comprises a number of times all tracks in all groups oftracks have been modified; and destaging the tracks in the group in thecache to the storage in response to determining that the group frequencysatisfies the total frequency requirement.
 24. The computer programproduct of claim 23, wherein the operations further comprise:determining a mean frequency comprising the total frequency divided by anumber of tracks in the groups of tracks, wherein the determiningwhether the group frequency satisfies the total frequency requirementcomprises comparing the group frequency to the mean frequency todetermine whether the total frequency requirement is satisfied.
 25. Thecomputer program product of claim 24, wherein the comparing the groupfrequency to the mean frequency to determine whether the total frequencyrequirement is satisfied comprises determining whether the groupfrequency is less than the mean frequency, wherein the total frequencyrequirement is satisfied in response to determining that the groupfrequency is less than the mean frequency.
 26. The computer programproduct of claim 24, wherein the comparing the group frequency to themean frequency to determine whether the total frequency requirement issatisfied comprises determining whether the group frequency is greaterthan the mean frequency, wherein the total frequency requirement issatisfied in response to determining that the group frequency is greaterthan the mean frequency.
 27. The computer program product of claim 23,wherein the operations further comprise: considering a next group oftracks to destage without destaging the group of tracks in response todetermining that the total frequency requirement is not satisfied; andconsidering the next group of tracks to destage after destaging thegroup of tracks in response to determining that the total frequencyrequirement is satisfied.
 28. The computer program product of claim 23,wherein the operations further comprise: decrementing the totalfrequency by frequencies of the tracks in the group to destage inresponse to determining that the total frequency requirement issatisfied.
 29. The computer program product of claim 23, wherein theoperations further comprise: determining whether all tracks in a groupof tracks are ready to destage, wherein the determining the groupfrequency for the group of tracks, the determining whether the groupfrequency satisfies the total frequency requirement, and the destagingthe tracks are performed in response to determining that the tracks inthe group are ready to destage.
 30. A system in communication with astorage, comprising: a processor; a cache; and a computer readablestorage medium having computer program code that when executed by theprocessor perform operations, the operations comprising: determining agroup frequency for a group of tracks indicating a number of timestracks in the group of tracks have been modified; determining whetherthe group frequency satisfies a total frequency requirement for a totalfrequency, wherein a total frequency comprises a number of times alltracks in all groups of tracks have been modified; and destaging thetracks in the group in the cache to the storage in response todetermining that the group frequency satisfies the total frequencyrequirement.
 31. The system of claim 30, wherein the operations furthercomprise: determining a mean frequency comprising the total frequencydivided by a number of tracks in the groups of tracks, wherein thedetermining whether the group frequency satisfies the total frequencyrequirement comprises comparing the group frequency to the meanfrequency to determine whether the total frequency requirement issatisfied.
 32. The system of claim 31, wherein the comparing the groupfrequency to the mean frequency to determine whether the total frequencyrequirement is satisfied comprises determining whether the groupfrequency is less than the mean frequency, wherein the total frequencyrequirement is satisfied in response to determining that the groupfrequency is less than the mean frequency.
 33. The system of claim 31,wherein the comparing the group frequency to the mean frequency todetermine whether the total frequency requirement is satisfied comprisesdetermining whether the group frequency is greater than the meanfrequency, wherein the total frequency requirement is satisfied inresponse to determining that the group frequency is greater than themean frequency.
 34. The system of claim 30, wherein the operationsfurther comprise: considering a next group of tracks to destage withoutdestaging the group of tracks in response to determining that the totalfrequency requirement is not satisfied; and considering the next groupof tracks to destage after destaging the group of tracks in response todetermining that the total frequency requirement is satisfied.
 35. Thesystem of claim 30, wherein the operations further comprise:decrementing the total frequency by frequencies of the tracks in thegroup to destage in response to determining that the total frequencyrequirement is satisfied.
 36. The system of claim 30, wherein theoperations further comprise: determining whether all tracks in a groupof tracks are ready to destage, wherein the determining the groupfrequency for the group of tracks, the determining whether the groupfrequency satisfies the total frequency requirement, and the destagingthe tracks are performed in response to determining that the tracks inthe group are ready to destage.
 37. A method implemented in a computerfor selecting tracks to destage from a cache to a storage, comprising:determining a group frequency for a group of tracks indicating a numberof times tracks in the group of tracks have been modified; determiningwhether the group frequency satisfies a total frequency requirement fora total frequency, wherein a total frequency comprises a number of timesall tracks in all groups of tracks have been modified; and destaging thetracks in the group in the cache to the storage in response todetermining that the group frequency satisfies the total frequencyrequirement.
 38. The method of claim 37, further comprising: determininga mean frequency comprising the total frequency divided by a number oftracks in the groups of tracks, wherein the determining whether thegroup frequency satisfies the total frequency requirement comprisescomparing the group frequency to the mean frequency to determine whetherthe total frequency requirement is satisfied.
 39. The method of claim38, wherein the comparing the group frequency to the mean frequency todetermine whether the total frequency requirement is satisfied comprisesdetermining whether the group frequency is less than the mean frequency,wherein the total frequency requirement is satisfied in response todetermining that the group frequency is less than the mean frequency.40. The method of claim 38, wherein the comparing the group frequency tothe mean frequency to determine whether the total frequency requirementis satisfied comprises determining whether the group frequency isgreater than the mean frequency, wherein the total frequency requirementis satisfied in response to determining that the group frequency isgreater than the mean frequency.
 41. The method of claim 37, wherein theoperations further comprise: considering a next group of tracks todestage without destaging the group of tracks in response to determiningthat the total frequency requirement is not satisfied; and consideringthe next group of tracks to destage after destaging the group of tracksin response to determining that the total frequency requirement issatisfied.
 42. The method of claim 37, further comprising: determiningwhether all tracks in a group of tracks are ready to destage, whereinthe determining the group frequency for the group of tracks, thedetermining whether the group frequency satisfies the total frequencyrequirement, and the destaging the tracks are performed in response todetermining that the tracks in the group are ready to destage.